using System.Collections.Generic;
using LiteTools.domains;
using LiteTools.domains.db;

namespace LiteTools.service.converters.data_parser.tlv
{
    public class TypeTlv : FormatType
    {
        public const string FormatType = "TLV";

        private static Dictionary<string, TypeTlv> _tlvParsers = new Dictionary<string, TypeTlv>
        {
            {BerTlvParser.Flag, new BerTlvParser()},
            {DgiTlvParser.FLAG, new DgiTlvParser()},
            {GpTlvParser.FLAG, new GpTlvParser()}
        };

        public override SpecificParser GetParser(string category)
        {
            return _tlvParsers[category];
        }

        public  override FormatData Handle(string originText, List<TagInfoHelper.TagInfo> tagWhiteList)
        {
            return HandleTlv(originText, tagWhiteList);
        }

        protected virtual FormatData HandleTlv(string originText, List<TagInfoHelper.TagInfo> tagWhiteList)
        {
            return null;
        }
    }
}